home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / program / 322 / unetnote / usenet.gcc < prev   
Encoding:
Text File  |  1988-10-20  |  12.5 KB  |  274 lines

  1. Article 11090 (2 more) in comp.sys.atari.st:
  2.  
  3. Subject: Strange '-s' flag behavior in the GNU linker ?
  4.  
  5.  
  6.     From: VBRANDT%DBNUAMA1.BITNET@CUNYVM.CUNY.EDU
  7.  
  8.     I have found what is not quite a bug, but a somewhat annoying feature in
  9.     the GNU C linker. It seems that the  '-s'  flag does exactly the opposite 
  10.     of what I think it should do. If you don't specify '-s',the linker appends
  11.     a symbol table to the executable, if you do specify it, no symbol table is
  12.     produced.
  13.  
  14. Well, I admit it's somewhat counter-intuitive, but the semantics of -s
  15. is unchanged from what it was in the unhacked LD.C. i.e., the default
  16. behaviour really is supposed to be to produce a symbol table.  After
  17. thinking about it, though, it seems reasonable to change it in the ST
  18. version, as the ST format symbol tables are never useful.  
  19.  
  20.        This means that to make executables without symbol tables, one 
  21.        cannot use GCC, but has to invoke everything manually. 
  22.  
  23. That's not true.  GCC passes the -s flag along if it's specified. (At
  24. least it's supposed to; did I introduce a bug at the last minute?)
  25.  
  26.     Also, all the executables from the GNU package themselves have quite 
  27.     big symbol tables. Removing them would save several KB, which might 
  28.     help people suffering from storage/memory shortages.
  29.  
  30. Indeed.  I'm pretty sure I built all the executables with -s (to GCC),
  31. so if they've really got symbol tables, perhaps I did leave a bug in
  32. there.  I'll investigate tonight and post the results.
  33.  
  34.        Anyway, thanks to John for his impressive work !
  35.  
  36. You're very welcome.
  37. End of article 11090 (of 11092)
  38. --what next? [npq]
  39.  
  40. Article 11091 (1 more) in comp.sys.atari.st:
  41.  
  42. Subject: Re: gcc problems
  43.  
  44.  
  45.     Date: 9 Sep 88 03:34:23 GMT
  46.     From: mcvax!cernvax!ethz!forty2!poole@uunet.uu.net  (Simon Poole)
  47.  
  48.     In article <JEFF.88Sep2035059@stormy.atmos.washington.edu> 
  49.     jeff@stormy.atmos.washington.edu (Jeff Bowden) writes:
  50.     >I grabbed the gcc executables a few days ago.  I found that I had
  51.     >insufficient resources to run it (sob :-( ). 
  52.  
  53.     Gcc can be run on a 1 MB machine!  You will not be able to compile any 
  54.     larger files from GULAM, but you can revert to compiling from the Desk-
  55.     top if memory is a problem.
  56.  
  57.     To bootstrap you NEED:
  58.     a copy of gulam
  59.     a diskeditor
  60.  
  61.     1) patch the executable of gcc-cc1.ttp so that only 300 kB of stack in-
  62.        stead of 500 kB are allocated (you can search for the value 500000, 
  63.        it only occurs once, somewhere around 364kB). 
  64.  
  65. Yah, that's described in the blurb.  In fact, 300000 is still far more
  66. than you need; in my experience, 128K is plenty for most things.  The
  67. thing that really eats stack is compiling large hairy functions is -O;
  68. the 500000 value is for compiling the instruction-cracking routing in
  69. GAS.  If you can live without -O, 64K or maybe even 32K will be enough.
  70.  
  71.        [That you have to do this is really
  72.        a bug, there is NO need for a GEMDOS only program, that doesn't exec
  73.        another program to give memory back to GEMDOS, I'm changing my crt0
  74.        so that it will take -1L in _stksize to mean: "Don't do a Mshrink"]
  75.  
  76. Careful; memory that is malloc'ed comes from ABOVE the stack, not below
  77. it, so you really do want to keep the stack at the smallest value that
  78. works for you.
  79.  
  80.     2) Now throw all resident stuff out (accessories etc. just keep GEMBOOT
  81.        or folderxxx (you do have a HD?)), start gulam and setup the enviroment
  82.        as described by jrd. You should now be able to compile most programs 
  83.        (you can compile all of flex except parse.c and scan.c for an example).
  84.        This is a good time to get the sources and extract the documentation
  85.        from them, how else are you going to know about -mshort 
  86.        -fomit-frame-pointer etc.?
  87.  
  88. Right.  If there's sufficient demand, I'll package up the docs
  89. separately; or someone else with more time could do so... hint hint...
  90.  
  91.     3) If a source file is too large to be compiled from GULAM, you will get
  92.        a "no more virtual memory" message or someting like that (probably
  93.        already from gcc-cpp). 
  94.  
  95. typically from gcc-cc1, actually...
  96.  
  97.                   You can workaround this by running the
  98.        compiler from the desktop, the current gcc.ttp will NOT work from the
  99.        desktop (reasons follow), so you will have to write a small wrapper
  100.        program to do this (I'm fixing gcc.ttp right now.....).
  101.  
  102.         Note: 
  103.                all gcc stuff assumes:
  104.                 file-handle
  105.                     0   = stdin
  106.                     1   = stdout
  107.                     2   = stderr
  108.                since the GEMDOS default for handle 2 is the serial
  109.                port, this isn't much good when you start stuff from
  110.                the desktop.
  111.  
  112. Yah, I've since realized that 2 is the serial port (!).  If you fix
  113. std-init, would you post the fixed version?  Also, does anyone out there
  114. have a description of what file numbers 'default' to what?
  115.  
  116.                So you need a
  117.                 Fforce(2,Fdup(1))
  118.                At the begining of your program to see any error output
  119.                (and due to a bug in stdio to see any output at all).
  120.  
  121.         Trying this shows two bugs in the current runtime library:
  122.  
  123.               -    Fforce has a wrong binding in osbind.h,
  124.                 it uses 3 short (aka 16 bit) arguments!
  125.                 Write a trap-1www function to do this.
  126.                 [BTW is anybody working on cleaning up
  127.                  the library, there is a lot of stuff that
  128.                  should be done]
  129.  
  130. No kidding.  As I said in the doc, the library is pretty ragged.  I'm
  131. working on getting rid of the trap_foo functions, and generating the
  132. traps in line; perhaps it makes sense to post a recompiled library when
  133. that happens?
  134. [...]
  135.  
  136.     Don't get put off by this description, GNC CC is worth it!
  137.  
  138. Glad you like it.
  139. End of article 11091 (of 11092)--what next? [npq]
  140.  
  141. Article 11108 (6 more) in comp.sys.atari.st:             20Sept88
  142. Subject: (none)
  143. From: roseate!cjp@stag.UUCP (Charles Purcell)
  144.  
  145. Re: gccGEMshell(long)
  146.  
  147. What!  Gnu C on the ATARI?  Someone had to be creative for this! Yes,
  148. it is really the Gnu gcc compiler  1.23  for use on the ATARI-ST Mega 
  149. and -ST line of M68000 based microcomputers. I emphasize the chipset
  150. which seems to have made the port possible. Gnu gcc has cost  traffic
  151. for various servers, and a lot of head scratching for installers.This
  152. compiler is big and beneficial. The provided Gnu documentation is re-
  153. quired reading if you are to teach C programming with an ATARI. Even 
  154. more remarkable is the port to ATARI! How can one use it on an ST-1040
  155. or 520+  First, the executable is in DRI format, with an extended sym-
  156. bol list,far advanced over DRI's symbol table, but structurally near-
  157. ly identical. Well,the nm68.prg from the developer's kit does read the
  158. symbol table of gcc, and does print out a redirectable output of good 
  159. use in debug mode. As well, sid makes equally good use of this symbol 
  160. table structure. Thus, the table structure is the same, equally limit-
  161. ed by an eight byte name string format. I use ar and nm in gnu format
  162. to read archives and object files for precise details. I would suspect 
  163. that the n.out format of MarkWilliams would be more useful,but illegal.
  164.  
  165. Please leave the symbol table in the standard DRI executable with the
  166. provision of a choice for no generation, -s . After the code is built, 
  167. I find that an old public domain code   prgstrip.prg   strips off the 
  168. symbol table precisely and accurately.(Anyway Richard has some strong
  169. words with respect to mandatory symbol table generation).
  170.  
  171. I found the stacklocations, with the help of sid.ttp and environs.ttp
  172. I set cc1   0x05b1c8   to  0x018000    and cpp 0x8fcc   to 0x020000 .
  173. With these stacks and using gemshell(below) in ROM-TOS, I have been
  174. able to compile the 140,00 byte source  cccp.c into a 60 K byte .o
  175.  
  176. I have eliminated my ramdisk, my print spooler, my corner clock and a
  177. large number of other goodies, just so that I can compile with gcc on
  178. either of my megabyte systems. As a priviledged user of RAM-TOS V.1.4
  179. I can report that it is possible to compile, carefully, even with TOS
  180. in RAM! I can do a better & larger compile using this gemshell that I
  181. was thinking about. Thanks, Simon Poole, for your thoughts about the
  182. utility of gcc, and the importance of usage on  1  megabyte machines.
  183. Otherwise, I was thinking, why not go for a RAM upgrade. At any rate
  184. here is the  gemshell.c  as get up for use in the g: partition.
  185. ( compiled using MWC , use with keyclick from GEM window , usage: )
  186. :-v hello.c -o hello.s                   on a hard disk partition
  187. :-v -Ia:\include hello.c -o hello.tos    on either floppy(why dif?)
  188. SOURCE                                   why MWC? because of GEM...
  189.  
  190.  
  191. /* gemshell.c   forms gemshell.tos  STdNet-StPaulMN  17Sep88  CJPurcell */
  192. /* "one-liner" shell to compile w/gcc on an ATARI-1040ST or ATARI-520+  */
  193. #include <osbind.h> /* provides maximum available execute space in 1meg */
  194. /* eventually,read this info from an initialization file, i.e., gnu.rc  */
  195. static char *envp[] = { "gcc=g:\\exec\\gcc.ttp",
  196.                         "cc1=g:\\exec\\gcc-cc1.ttp",
  197.                         "cpp=g:\\exec\\gcc-cpp.ttp",
  198.                         "ld=g:\\exec\\gcc-ld.ttp",
  199.                         "as=g:\\exec\\gcc-as.ttp",
  200.                         "GCCEXEC=g:\\exec\\gcc-",
  201.                         "INCLUDE=g:\\include",
  202.                         "GNULIB=g:\\lib",
  203.                         "TEMP=p:",
  204.                         "PATH=",
  205.                         "A:\\",
  206.                         0      };
  207. main()       {
  208.    unsigned char buffer[130];
  209.    int       status;
  210.    buffer[0] = 128;
  211.    Cconws("gccGEMshell Enter:  command_line_string   (^C exits)\r\n:");
  212.    Cconrs(buffer);
  213.    Cconws("\r\n");
  214.    buffer[1] = ' ';   /*   command buffer mandatory space prefix */ 
  215.                       /* 0 selects loadgo                        */
  216.    status = (int) Pexec(  0 , "g:\\exec\\gcc.ttp", &buffer[1], *envp );
  217.    Cconws("\r\n Pause to read compiler messages; Any key continues: \r\n");
  218.    Bconin(2);
  219.    return(status);
  220. }
  221.  
  222. and a binary useful for partition  g:
  223. BINARY
  224. ---------------cut here for uudecode---------------------------
  225. table
  226.  !"#$%&'()*+,-./0123456789:;<=>?
  227. @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
  228. begin 644 gemshell.tos
  229. M8!H   .4   !K@    8    P             "IO  0@;0 8T>T '"1M "Q"z
  230. M@")(2A)G4"**)DHD64H:9OPBBDH29SP,&P!!9NP,&P!29N8,&P!'9N ,&P!6y
  231. M9MH,&P ]9@I*$V<&(\L   4:0ID@"2**)DHD64H:9OPBBDH29O(F &8R0ID@x
  232. M"2+\   %/$7M ( 4&DB"0C(@ '(@%!IG%K0!9_A32B+*%!IG"K0!9OA"*O__w
  233. M8.9"F2()T_D   4^(\$   4^+DDK20 $+PTCR   !40O""\ DH#D@5-!/P&3v
  234. MS2\)+PU"9S\\ $I.0=[\  Q">0  !4)*@V8N/SP !#\\  ).N0   =@^@$ZYu
  235. M   ")C]\  (  D)73KD   '8/H!.N0   B983YS.3KD   $HWOP "C\ 3KD t
  236. M  &B/SP 3$Y!3E;_?!U\ (#_?DAY   $E' )/P!.05Q/2&[_?G */P!.05Q/s
  237. M2'D   3,< D_ $Y!7$]P(!U _W\O.0   ZQ(;O]_2'D   3/0F=P2S\ 3D'>r
  238. M_  0/4#_?$AY   $WW )/P!.05Q/< (_ ' "/P!.35A/,"[_?$Y>3G5.5@  q
  239. --MORE--(75%)
  240. M3KD   &\/RX "$ZY   !Q%1/3EY.=4Y6  !.7DYU3E8  #\N  AP3#\ 3D%8p
  241. M3TY>3G5.5O_\+P<_+@ (<$4_ $Y!6$\^ &P0, =(P"\ 3KD   -R6$]@(C\No
  242. M  A.N0   GY43SU   AM#C\N  @_!TZY   "UEA/, <N'TY>3G5.5O_\+P<_n
  243. M+@ (/RX "G)&/P%.05Q//@ P &8H/RX "$ZY   "?E1//4  "&T6/RX "#\Nm
  244. M  I.N0   M983S N  I@#C '2, O $ZY   #<EA/+A].7DYU3E;_^$C7(( ^l
  245. M+@ (, =60 Q   )B'.5(,$#1_    Y0@4$[08"IP4& F<$%@(G!#8!XP!VT.k
  246. M*GD   4:4T=M"! =9OAP_V ($!5G^! 52(!,UR" 3EY.=4Y6__A(UR" /BX j
  247. M"# ';0XJ>0  !1I31VT($!UF^'#_8 H0%6?X,"X "AJ 3-<@@$Y>3G5.5O_Xi
  248. M2-<@@#XN  @P!U9 #$   F)(Y4@P0-'\   #H"!03M J>0  !1H0%4B L$=Gh
  249. M#! 59@1PW6 F4HU@[" -D+D   4:/P!.N0   =A43V .?D-@SGY!8,I^4&#&g
  250. M<-M,UR" 3EY.=4Y6   @+@ (;! @+@ (1( SP   !4)P_V $("X "$Y>3G4 f
  251. M  *D   "J    JP   -D   #8    UP   /<   #\   ! @   0@   $-@  e
  252. M!$P   1A   $=   !((   2*   $D     !G8V,]9SI<97AE8UQG8V,N='1Pd
  253. M &-C,3UG.EQE>&5C7&=C8RUC8S$N='1P &-P<#UG.EQE>&5C7&=C8RUC<' Nc
  254. M='1P &QD/6<Z7&5X96-<9V-C+6QD+G1T< !A<SUG.EQE>&5C7&=C8RUA<RYTb
  255. M='  1T-#15A%0SUG.EQE>&5C7&=C8RT 24Y#3%5$13UG.EQI;F-L=61E $=.a
  256. M54Q)0CUG.EQL:6( 5$5-4#UP.@!0051(/0!!.EP 9V-C1T5-<VAE;&P@16YTz
  257. M97(Z("!C;VUM86YD7VQI;F5?<W1R:6YG(" @*%Y#(&5X:71S*0T*.@ -"@!Gy
  258. M.EQE>&5C7&=C8RYT='  #0H@4&%U<V4@=&\@<F5A9"!C;VUP:6QE<B!M97-Sx
  259. M86=E<SL@06YY(&ME>2!C;VYT:6YU97,Z( T*      4>0T-!4#\_/S\_/S\_w
  260. M/S\_/S\_/S\_/S\_/S\_/P        @ !P$0 0H ,    )0#            v
  261. M !@   "6 0  !@                          3"(R!@XD$@@." H,%AH4u
  262. F"A8F"D0.%# 6%"@<,CX*' @P$ 0$! 0$! 0$! 0$! 0$! 0!2  .t
  263. --MORE--(96%)
  264.  s
  265. end
  266.  
  267. electronic mail:                    Charles J.Purcell
  268. woods!cpurcell@eta                  1260 W.Shryer Ave    
  269. roseate!cjp@stag.UUCP               St.Paul, MN 55113            
  270.  
  271. roseate!cjp@stag.UUCP(Charles Purcell )
  272. End of article 11108 (of 11114)--what next? [npq]
  273.  
  274.